package cn.edu.yzu.scholarship.pojo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * EasyUI定制menu
 * @author francis
 */
public class Menu {
	
	private int id;
	private String text;
	private String iconCls;
	private String state;
	private Map<String,Object> attributes = new HashMap<String,Object>();
	private List<Menu> children;
	
	public Menu(String text, String url) {
		this.text = text;
		this.attributes.put("url",url);
	}

	public Menu(String text, String url, String iconCls) {
		this.text = text;
		this.attributes.put("url",url);
		this.iconCls = iconCls;
	}

	public Menu(int id, String text, String iconCls, String state,
			Map<String, Object> attributes, List<Menu> children) {
		this.id = id;
		this.text = text;
		this.iconCls = iconCls;
		this.state = state;
		this.attributes.putAll(attributes);
		this.children = children;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getIconCls() {
		return iconCls;
	}
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}
	public Map<String, Object> getAttributes() {
		return attributes;
	}
	public void setAttributes(Map<String, Object> attributes) {
		this.attributes = attributes;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public List<Menu> getChildren() {
		return children;
	}
	public void setChildren(List<Menu> children) {
		this.children = children;
	}
	
}
